package com.itfreer.xjmh.security;

import com.itfreer.bpm.api.BpmBaseRestService;
import com.itfreer.form.api.PageInfo;
import com.itfreer.utils.ResponseEntity;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.itfreer.bpm.api.BaseWorkFlowService;

import io.swagger.annotations.Api;

import com.itfreer.xjmh.security.entity.SecurityPersonEntity;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 定义安保人员Rest服务接口
 */
@RestController
@RequestMapping("/securityperson")
@Api("安保人员")
public class RestSecurityPersonService extends BpmBaseRestService<SecurityPersonEntity> {
	
	@Autowired(required = false)
	private SecurityPersonService service;

	@Override
	protected BaseWorkFlowService<SecurityPersonEntity> getWorkFlowService() {
		return service;
	}

	@ApiOperation("统计图展示数据")
	@PostMapping({"/getAllData"})
	public ResponseEntity<List<Map<String, Object>>> getAllData(@RequestBody String input) {
		return service.getAllData();
	}
}
